<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="com.sms.note.*, com.sms.servlet.*"%>
<%@ page import="net.sf.json.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
  <body>
  
  <div style="position:relative; left:80px;top:80px;width:80%;">
  <p>最新公告：</p>
  <hr>
 
<%

 
request.setCharacterEncoding("UTF-8");
List<Map> jlist=new ArrayList<Map> ();
    	jlist=Note.query();
    	//System.out.println(jlist.size());
    	JSONArray json = new JSONArray(); 
    	 for(int i=0;i<jlist.size();i++){
    		 Map map=jlist.get(i);        		 		 
    		 %>   
    		 
  <p class="note" style="margin-top:10px;cursor:pointer" > <input type="hidden" id="<%=i%>" value="<%=map.get("infoid")%>">
  <a style="width:450px;"> <%=i+1%>.&nbsp;&nbsp;&nbsp;<%=map.get("title")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     <em style="font-size:12px;"><%=map.get("notetime") %></em>
  </a> 
  </p>
 
 <%
 }
  %> 
  </div>
  
  <div id="dd">
  
  </div>
  
   <script type="text/javascript">
  $(document).ready(function(){
  
  
  
  
  //alert("hello");
$(".note").click(function(){
   var infoid=$(this).find('input').val();
   //alert(infoid);
   $('#dd').dialog({
			         title:"公告详情",
					  zIndex:9001,
					 width:680, height:400,
					 top:150,left:300,
					 maximizable:true,
					 cache:false,
					 href:'detailnote.jsp?id='+ infoid
					 });
})

})
</script>
  </body>
 




